Skip to content

Configure GitHub pages with docsify#43

Merged
snipsnipsnip merged 7 commits intoexteditor:mainfrom
snipsnipsnip:docsify-website
Oct 20, 2025
Merged

Configure GitHub pages with docsify#43
snipsnipsnip merged 7 commits intoexteditor:mainfrom
snipsnipsnip:docsify-website

Conversation

@snipsnipsnip
Copy link
Copy Markdown
Member

@snipsnipsnip snipsnipsnip commented Oct 20, 2025

Closes #5

Summary by CodeRabbit

  • Documentation
    • New interactive documentation website launched with comprehensive project information, installation options, setup workflows, troubleshooting guides, and frequently asked questions
    • Updated README with corrected external resource links for licenses and enhanced accessibility through descriptive image descriptions

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Oct 20, 2025

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Summary by CodeRabbit

  • Documentation

    • Added new documentation site with cover page and project homepage
    • Updated README with corrected license links and Thunderbird download URL
    • Enhanced image accessibility with proper alt text
  • Chores

    • Updated PR template with dual-licensing acknowledgment checkbox
    • Updated GitHub Actions workflows for improved documentation generation and deployment

Walkthrough

Adds a Docsify-based documentation site and site build artifacts, updates Codecov configuration to a component-based layout, adjusts CI workflows for docs and build triggers, modifies alarm readiness API to require explicit registration, and makes minor PR template, README, and inline-comment changes.

Changes

Cohort / File(s) Summary
Documentation site
.github/site/coverpage.md, .github/site/homepage.md, .github/site/index.html, .github/site/index.mjs
Introduces a Docsify site with coverpage and homepage content, index HTML, Docsify+Mermaid initialization, custom markdown rendering, redirect routing, and plugin to run Mermaid after render.
Codecov configuration
.github/codecov.yml
Replaces top-level coverage layout with a comment-based layout and component_management; adds default_rules and individual_components (app, ghosttext, infra) with path globs.
CI workflows
.github/workflows/build.yml, .github/workflows/doc.yml
Adjusts branch filters for builds (ignore coderabbit** and gh-**) and updates docs workflow to move TypeDoc and markdown outputs into .github/site/ and change artifact upload paths.
Repository docs & template
.github/pull_request_template.md, README.md
PR template: adds dual-licensing checkbox, removes explicit PR-type options, injects CodeRabbit AI directive and @coderabbitai tag; README: updates external license links, Thunderbird ESR URL, and button image alt text.
Alarm readiness & handlers
src/thunderbird/background_util/alarm_heart.ts, src/root/background.ts, src/root/startup/startup_background.ts
Replaces assumeReady() with ready(registeredCallback) in AlarmHeart (new signature); adds top-level onAlarm helper and registers it via heart.ready(onAlarm); removes premature assumeReady() call during startup.
Non-functional comments
src/app-background/compose_action_notifier.ts, src/app-background/menu_handler.ts
Adds or expands inline/documentation comments without behavior changes.

Sequence Diagram(s)

sequenceDiagram
    participant Startup as startup_background.ts
    participant Background as background.ts
    participant Heart as AlarmHeart
    participant Messenger as messenger.alarms

    rect rgba(240,248,255,0.9)
    Note over Startup,Heart: Old flow (pre-change)
    Startup->>Heart: assumeReady()
    Heart->>Heart: isListenerReady = true
    end

    rect rgba(245,255,240,0.9)
    Note over Background,Messenger: New flow (post-change)
    Background->>Background: define onAlarm callback (top-level)
    Background->>Messenger: register onAlarm listener
    Background->>Heart: heart.ready(onAlarm)
    Heart->>Heart: set readiness based on registered callback
    Messenger->>Background: onAlarm event
    Background->>Background: handle/log alarm
    end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Poem

🐰 I nibbled docs and drew a mermaid line,

Moved pages, scripts, and badges so they shine.
Alarms now wait for a kindly call,
Codecov learned to track components small.
A rabbit hops — the docs stand proud and fine.

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings, 1 inconclusive)
Check name Status Explanation Resolution
Out of Scope Changes Check ⚠️ Warning The pull request contains several out-of-scope changes unrelated to configuring GitHub pages with Docsify. These include TypeScript code changes affecting alarm handling and logging (src/root/background.ts, src/root/startup/startup_background.ts, src/thunderbird/background_util/alarm_heart.ts), modifications to the PR template (.github/pull_request_template.md), codecov configuration changes (.github/codecov.yml), and build workflow branch filtering updates (.github/workflows/build.yml), none of which relate to the stated objective of setting up the Docsify-based documentation site.
Description Check ⚠️ Warning The provided pull request description does not follow the required template structure. The author has only included a reference to issue #5 and a CodeRabbit-generated summary, but has completely omitted all the required template sections. The description is missing the dual-licensing checkbox acknowledgment, the "What kind of change" categorization, the "current behavior" explanation, the "new behavior" description, the manual testing steps, and other required sections. While the CodeRabbit summary provides some context about documentation changes and README updates, the author has not filled out any of the structured template sections that are mandatory for this repository. The author should update the pull request description to follow the repository's template. This includes checking the dual-licensing acknowledgment checkbox, explicitly selecting a change type (Documentation appears to be the appropriate choice based on the changes), providing context about the current state (reference to issue #5), describing the new documentation website and README improvements, and optionally listing verification steps. The CodeRabbit summary should be integrated into or supplemented by the structured template sections rather than used as a replacement for them.
Linked Issues Check ❓ Inconclusive The linked issue #5 is titled "[Task] Website with some screenshots" but its full requirements are not provided. The changeset does include website configuration with Docsify (index.html, index.mjs, coverpage.md, homepage.md) and workflow updates for documentation deployment, which align with the general objective of creating a website. However, without the complete issue description and specific requirements, it is not possible to verify whether all coding requirements and objectives from the issue have been fully met.
✅ Passed checks (2 passed)
Check name Status Explanation
Title Check ✅ Passed The title "Configure GitHub pages with docsify" accurately reflects the primary changes in the pull request. The changeset contains multiple new Docsify configuration files (.github/site/index.html, index.mjs), documentation pages (coverpage.md, homepage.md), and updated workflows (doc.yml) to deploy the documentation site, all of which align directly with the stated objective of configuring GitHub pages with Docsify.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c7e64b7 and 7bb1fbf.

📒 Files selected for processing (5)
  • .github/site/coverpage.md (1 hunks)
  • .github/site/homepage.md (1 hunks)
  • .github/site/index.html (1 hunks)
  • .github/site/index.mjs (1 hunks)
  • .github/workflows/doc.yml (1 hunks)

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link
Copy Markdown

codecov bot commented Oct 20, 2025

Codecov Report

❌ Patch coverage is 14.28571% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 46.97%. Comparing base (67c2fcb) to head (7bb1fbf).
⚠️ Report is 8 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
Components Coverage Δ
app 32.47% <ø> (ø)
ghosttext 49.18% <ø> (ø)
infra 44.00% <14.28%> (-0.46%) ⬇️

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 8

🧹 Nitpick comments (1)
.github/site/index.html (1)

1-11: Consider adding SRI hashes for CDN resources.

CDN resources are loaded without Subresource Integrity (SRI) hashes. While this is common for documentation sites, adding SRI would protect against CDN compromises.

You can generate SRI hashes using:

#!/bin/bash
# Generate SRI hashes for CDN resources
echo "Docsify CSS:"
curl -s "https://cdn.jsdelivr.net/npm/docsify@4.13.1/lib/themes/vue.min.css" | openssl dgst -sha384 -binary | openssl base64 -A
echo -e "\n\nMermaid JS:"
curl -s "https://cdn.jsdelivr.net/npm/mermaid@11.12.0/dist/mermaid.min.js" | openssl dgst -sha384 -binary | openssl base64 -A
echo -e "\n\nDocsify JS:"
curl -s "https://cdn.jsdelivr.net/npm/docsify@4.13.1/lib/docsify.min.js" | openssl dgst -sha384 -binary | openssl base64 -A
echo -e "\n\nDocsify Search:"
curl -s "https://cdn.jsdelivr.net/npm/docsify@4.13.1/lib/plugins/search.min.js" | openssl dgst -sha384 -binary | openssl base64 -A

Then add integrity and crossorigin attributes to each resource.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 67c2fcb and 8e950b8.

📒 Files selected for processing (14)
  • .github/codecov.yml (1 hunks)
  • .github/pull_request_template.md (1 hunks)
  • .github/site/coverpage.md (1 hunks)
  • .github/site/homepage.md (1 hunks)
  • .github/site/index.html (1 hunks)
  • .github/site/index.mjs (1 hunks)
  • .github/workflows/build.yml (1 hunks)
  • .github/workflows/doc.yml (1 hunks)
  • README.md (1 hunks)
  • src/app-background/compose_action_notifier.ts (1 hunks)
  • src/app-background/menu_handler.ts (1 hunks)
  • src/root/background.ts (3 hunks)
  • src/root/startup/startup_background.ts (0 hunks)
  • src/thunderbird/background_util/alarm_heart.ts (1 hunks)
💤 Files with no reviewable changes (1)
  • src/root/startup/startup_background.ts
🧰 Additional context used
🧬 Code graph analysis (2)
src/root/background.ts (2)
src/root/startup/startup_background.ts (1)
  • prepareBackgroundRouter (33-37)
src/thunderbird/messenger/alarms.ts (1)
  • Alarm (39-46)
src/thunderbird/background_util/alarm_heart.ts (2)
src/ghosttext-runner/api.ts (1)
  • IHeart (11-17)
src/thunderbird/messenger/alarms.ts (1)
  • Alarm (39-46)
🪛 LanguageTool
.github/site/homepage.md

[uncategorized] ~43-~43: The official name of this software platform is spelled with a capital “H”.
Context: ...e [Thunderbird add-on website][amo] or [Github Releases][rels]. 2. In Thunderbird, go ...

(GITHUB)


[style] ~91-~91: Consider using a less common alternative to make your writing sound more unique and professional.
Context: ...header). * [Rate the add-on][review]. * Feel free to open issues and submit pull requests. S...

(FEEL_FREE_TO_STYLE_ME)

🪛 markdownlint-cli2 (0.18.1)
.github/site/coverpage.md

13-13: Link fragments should be valid

(MD051, link-fragments)

.github/site/homepage.md

62-62: Images should have alternate text (alt text)

(MD045, no-alt-text)


63-63: Images should have alternate text (alt text)

(MD045, no-alt-text)


64-64: Images should have alternate text (alt text)

(MD045, no-alt-text)


127-127: Link fragments should be valid

(MD051, link-fragments)


137-137: Link and image reference definitions should be needed
Unused link or image reference definition: "proj"

(MD053, link-image-reference-definitions)


149-149: Link and image reference definitions should be needed
Unused link or image reference definition: "protocol"

(MD053, link-image-reference-definitions)

🔇 Additional comments (18)
src/app-background/menu_handler.ts (1)

19-20: Clear documentation of design rationale.

The added comments provide helpful context about why the initialization logic uses a simple approach rather than more sophisticated alternatives, and specifically calls out real corner cases (like UI language changes). This is useful for future maintainers who might otherwise attempt to "improve" this logic.

src/app-background/compose_action_notifier.ts (1)

4-4: Clear and appropriate documentation.

The added JSDoc comment accurately describes the class responsibility. No functional changes.

.github/workflows/build.yml (1)

5-5: Branch filter update looks reasonable.

The pattern change from wip/** to ['coderabbit**', 'gh-**'] appropriately excludes CodeRabbit auto-fix branches and GitHub Pages-related branches from CI runs. This aligns with avoiding CI overhead on automated branches.

.github/pull_request_template.md (1)

1-10: PR template improvements are appropriate.

The additions enhance governance: the dual-licensing acknowledgment ensures contributor awareness, and the CodeRabbit directive enables automated reviews. These changes align with the PR's broader infrastructure updates.

README.md (1)

271-277: External link updates improve clarity and reliability.

The license badge links now point to official license pages, and the Thunderbird reference link directs to the ESR download page—both improvements that enhance user experience and align with the documented ESR requirement.

.github/codecov.yml (1)

1-18: Component-based coverage tracking improves observability.

The new component_management configuration provides granular coverage tracking across app, ghosttext, and infra components. The path glob patterns clearly delineate responsibility areas, and setting project/patch statuses to informational prevents false negatives on coverage.

.github/workflows/doc.yml (1)

53-57: The review comment is incorrect; all required files and directories exist.

The workflow steps on lines 53-57 will execute successfully:

  • Line 54 (mv build/doc/ ...): The build/doc/ directory is generated at runtime by the yarn run doc step (line 48), which runs TypeDoc. This is standard TypeDoc behavior and the directory will exist when line 54 executes.

  • Line 57 (mv *.md doc/ ext/ ...): All sources exist in the repository:

    • Markdown files: BUILDING.md, CONTRIBUTING.md, README.md ✓
    • doc/ directory: contains documentation ✓
    • ext/ directory: contains extension assets ✓

The workflow trigger (lines 7-10) only activates when these paths change, so they are guaranteed to exist during execution. No defensive flags or conditional checks are needed.

Likely an incorrect or invalid review comment.

src/root/background.ts (3)

7-7: LGTM: Import added for type safety.

The Alarm type import supports the new typed onAlarm function signature.


38-40: LGTM: Top-level alarm handler.

The top-level onAlarm function correctly satisfies MV3 requirements for event listener registration.


62-62: Listener registration is correct but see ordering issue above.

The top-level registration satisfies MV3 requirements, but the ready() call ordering needs to be fixed (see comment on lines 32-33).

.github/site/index.mjs (5)

1-1: Verify Mermaid is loaded before this script executes.

This assumes window.mermaid exists. Given the script loading order issue in index.html, ensure this script executes after mermaid.min.js loads (see comment on index.html:14-17).


5-15: Note: executeScript: true security consideration.

Setting executeScript: true allows JavaScript in markdown code blocks to execute. Ensure all documentation content is from trusted sources to prevent XSS risks.


22-30: LGTM: Search index configuration.

The search paths cover key documentation files appropriately.


31-40: Consider escaping HTML entities in Mermaid code blocks.

The code parameter is directly interpolated into HTML without escaping. While the documentation is from trusted sources, escaping would prevent issues if code contains </pre> or other HTML.

   markdown: {
     renderer: {
       code(code, lang) {
         if (lang === "mermaid") {
-          return `<pre class="mermaid">${code}</pre>`;
+          // Escape HTML entities to prevent breaking out of <pre>
+          const escaped = code.replace(/[&<>"']/g, (c) => {
+            const escapes = { '&': '&amp;', '<': '&lt;', '>': '&gt;', '"': '&quot;', "'": '&#39;' };
+            return escapes[c];
+          });
+          return `<pre class="mermaid">${escaped}</pre>`;
         }
         return this.origin.code.apply(this, arguments);

Wait, actually Mermaid needs to parse the raw code, so we shouldn't escape it. Mermaid will handle the rendering safely. Let me reconsider...

Actually, looking at Mermaid documentation, the recommended way is to put the code inside a <pre class="mermaid"> tag, and Mermaid will safely process it. So the current implementation is correct. Mermaid itself handles any potential issues with the content.


41-45: LGTM: Mermaid plugin integration.

The plugin correctly triggers Mermaid rendering after each route loads.

src/thunderbird/background_util/alarm_heart.ts (3)

2-4: LGTM: Import and documentation added.

The Alarm type import and doc comment correctly describe the class purpose.


11-17: LGTM: Improved readiness verification.

The ready() method correctly verifies that the callback is actually registered using hasListener(), which is more robust than the previous assumeReady() approach. The MV3 requirement is well-documented.


19-26: LGTM: Assertion enforces correct initialization.

The assertion at line 20 will catch initialization errors (such as the ordering issue in background.ts), which is good defensive programming.

* Fix links to license website
* Link to the Thunderbird ESR download page
* Also remove catch-all `src/` definition from the Codecov config
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

♻️ Duplicate comments (2)
.github/site/homepage.md (1)

43-43: Capitalize "GitHub" per style guidelines.

Line 43 uses "Github" but the official product name is "GitHub" with a capital "H".

- 1. Download the latest release from the [Thunderbird add-on website][amo] or [Github Releases][rels].
+ 1. Download the latest release from the [Thunderbird add-on website][amo] or [GitHub Releases][rels].
.github/site/coverpage.md (1)

13-13: Fix mismatched link text and target anchor.

Line 13 displays text "Installation" but links to #requirements instead of #installation. The displayed text should match the destination anchor.

-[Installation](#requirements)
+[Installation](#installation)
🧹 Nitpick comments (1)
.github/site/homepage.md (1)

137-137: Remove unused link reference definition.

Line 137 defines [proj] which is never referenced in the markdown content. Removing it reduces clutter.

-[proj]: https://github.com/exteditor/ghostbird/projects
 [milestones]: https://github.com/exteditor/ghostbird/milestones
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9d188da and c7e64b7.

📒 Files selected for processing (8)
  • .github/codecov.yml (1 hunks)
  • .github/site/coverpage.md (1 hunks)
  • .github/site/homepage.md (1 hunks)
  • .github/site/index.html (1 hunks)
  • .github/site/index.mjs (1 hunks)
  • .github/workflows/build.yml (1 hunks)
  • .github/workflows/doc.yml (1 hunks)
  • README.md (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (3)
  • .github/workflows/build.yml
  • .github/codecov.yml
  • .github/site/index.mjs
🧰 Additional context used
🪛 LanguageTool
.github/site/homepage.md

[uncategorized] ~43-~43: The official name of this software platform is spelled with a capital “H”.
Context: ...e [Thunderbird add-on website][amo] or [Github Releases][rels]. 2. In Thunderbird, go ...

(GITHUB)


[style] ~91-~91: Consider using a less common alternative to make your writing sound more unique and professional.
Context: ...header). * [Rate the add-on][review]. * Feel free to open issues and submit pull requests. S...

(FEEL_FREE_TO_STYLE_ME)

🪛 markdownlint-cli2 (0.18.1)
.github/site/coverpage.md

13-13: Link fragments should be valid

(MD051, link-fragments)

.github/site/homepage.md

137-137: Link and image reference definitions should be needed
Unused link or image reference definition: "proj"

(MD053, link-image-reference-definitions)

🔇 Additional comments (4)
README.md (3)

65-67: Excellent accessibility improvements to button images.

Adding explicit alt attributes with descriptive text ("Gray button", "Blue button", "Red button") improves screen reader support and follows WCAG best practices. The alt text is concise and contextually useful for users navigating with assistive technologies.


271-272: Updated license badge links to official sources.

The links now correctly point to the official Mozilla Public License 2.0 and GNU GPL-3.0 license pages, replacing any outdated or redirect URLs. This ensures users can easily access authoritative license information.


277-277: Thunderbird link now points to official ESR download page.

The reference link correctly directs to the official Thunderbird ESR download page, which aligns with the requirement stated in line 15 specifying Thunderbird 140 ESR support.

.github/site/index.html (1)

11-11: Verify that Docsify configuration is set before library initialization.

Based on a past review, there was a critical issue with script loading order where window.$docsify configuration was set after Docsify's library loaded. The current file shows only the module script; please verify that index.mjs dynamically loads Docsify in the correct order, or that configuration is inline before the library script.

If index.mjs loads Docsify dynamically, ensure it sets window.$docsify before creating and appending the Docsify script tag. If you're loading Docsify from a CDN, it should appear after the configuration is set in the DOM.

Can you confirm that the Docsify library is loaded after configuration is defined?

@snipsnipsnip snipsnipsnip added this pull request to the merge queue Oct 20, 2025
Merged via the queue into exteditor:main with commit a6a78f5 Oct 20, 2025
7 checks passed
@snipsnipsnip snipsnipsnip deleted the docsify-website branch October 20, 2025 14:25
@github-project-automation github-project-automation bot moved this from 📥️Inbox to 🪺Experimental in Ghostbird Issues Oct 20, 2025
@snipsnipsnip snipsnipsnip moved this from 🪺Experimental to ✅Closed in Ghostbird Issues Oct 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

[Task] Website with some screenshots

1 participant